package wzvtc.dbad.attend.entity;


import org.springframework.data.annotation.AccessType;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

/**
 * 考勤表（表是纸面意义上上的表格，或者说是某次考勤）
 */
@AccessType(AccessType.Type.FIELD)
@Table("T_ATTENDENCE")
public class Attendence {
    private @Id long id;

    private long curriculumId;

    /**
     * 针对哪个班级的考勤
     */
    private long clazzId;
    /**
     * 考勤员ID
     */
    private long attendantId;


    private long teacherId;


    private long courseId;


    /**
     * 这次考勤点是开始于第几周周几第几节课?
     * 参见 {@see Curriculum}
     */
    private long startFrom;

    /**
     * 这次考勤涵盖几节课？/
     */
    private int hours;



    /**
     * 考勤表状态,默认是未确认状态
     */

    private AttendenceState state=AttendenceState.未确认;

    public Attendence(long curriculumId, long clazzId, long attendantId, long teacherId, long courseId, long startFrom, int hours) {
        this.curriculumId = curriculumId;
        this.clazzId = clazzId;
        this.attendantId = attendantId;
        this.teacherId = teacherId;
        this.courseId = courseId;
        this.startFrom = startFrom;
        this.hours = hours;
    }

    public long getId() {
        return id;
    }

    public long getCurriculumId() {
        return curriculumId;
    }

    public long getClazzId() {
        return clazzId;
    }

    public long getAttendantId() {
        return attendantId;
    }

    public long getTeacherId() {
        return teacherId;
    }

    public long getCourseId() {
        return courseId;
    }

    public long getStartFrom() {
        return startFrom;
    }

    public int getHours() {
        return hours;
    }

    public AttendenceState getState() {
        return state;
    }
}
